<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html lang="zh-CN" class="ua-windows ua-webkit">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
<title>读书小组</title>
<meta http-equiv="Pragma" content="no-cache">
<link rel="stylesheet" type="text/css" href="<s:url value="/css/base.css"/>"></link>
<script src="<s:url value="/js/jquery-1.4.4.min.js"/>" type="text/javascript"></script>
<script src="<s:url value="/js/formValidator/formValidator-4.1.1.js"/>" type="text/javascript" charset="UTF-8"></script>
<script src="<s:url value="/js/formValidator/formValidatorRegex.js"/>" type="text/javascript" charset="UTF-8"></script>
<script type="text/javascript">
$(document).ready(function(){
	$.formValidator.initConfig({formID:"zcform",theme:"Default",debug:false,submitOnce:true,
		onError:function(msg,obj,errorlist){
			$("#errorlist").empty();
			$.map(errorlist,function(msg){
				$("#errorlist").append("<li>" + msg + "</li>")
			});
			alert(msg);
		},
		submitAfterAjaxPrompt : '有数据正在异步验证，请稍等...',
		onShowClass : "",
		onFocusClass : "",
		onCorrectClass : ""
	});
	
	$("#groupName").formValidator({onShow:"输入一个响亮的小组名称吧",onFocus:"至少2个汉字(4个字符),最多100个字符",onCorrect:"不错不错,输入正确。~ ^_^"}).inputValidator({min:4,max:100,onError:"请输入个靠谱点的名字,至少2个汉字,最多100个字符"});
	$("#logo").formValidator({onShow:"选择一个网络图片,作为你的小组LOGO吧！",
		onFocus:"一定要以http://作为开头哈~，避免图片显示失败。",onCorrect:"恭喜你,你输对了~~^_^",defaultValue:"http://"}).inputValidator({min:10,max:150,onError:"您输入的地址长度有误!"});
	$("#memo").formValidator({onShow:"输入你的小组简介吧，让更多人喜欢你的小组 。",onFocus:"至少6个长度",onCorrect:"好吧，算你赢了。！~~^_^"}).inputValidator({min:6,onError:"简介要大于6个字哦！"});
	$("#notice").formValidator({onShow:"有人想对小组成员说的？写上吧！",onFocus:"至少6个长度",onCorrect:"OK，精彩的发言。！~~^_^"}).inputValidator({min:6,onError:"公告要大于6个字哦！"});
	
	
});


</script>
<style type="text/css">

</style>
</head>
<body>
	<%@include file="/top.jsp"%>
	<div id="wrapper">
		<div id="header">
			<div class="site-nav single-nav">
				<div class="site-nav-logo">
				</div>
			</div>
		</div>
		<div id="content">

			<h1>创建读书小组</h1> <span class="errorMessage">${message}</span>
			<div class="grid-16-8 clearfix">
				<div class="article">
					<form id="zcform" name="zcform" method="post" action="<s:url value="/account/group/save.action?op=save" />">
						<div class="item extra-tips">
							<label>小组名称</label>
							<input type="text" id="groupName" maxlength="200" class="basic-input" name="userGroup.groupName" />
						</div>
						<div class="suggestion" >
							<span id="groupNameTip"></span>
						</div>
						<div class="item extra-tips">
							<label>网络图片</label>
							<input type="text" id="logo" maxlength="200" class="basic-input"  name="userGroup.logo" />
						</div>
						<div class="suggestion" >
							<span id="logoTip"></span>
						</div>						
						<div class="item extra-tips">
							<label>小组简介</label>
							<textarea id="memo" style="width: 300px;height: 100px;" name="userGroup.memo" ></textarea>
						</div>
						<div class="suggestion" >
							<span id="memoTip"></span>
						</div>
						<div class="item extra-tips">
							<label>小组公告</label>
							<textarea id="notice" style="width: 300px;height: 100px;" name="userGroup.notice" ></textarea>
						</div>
						<div class="suggestion" >
							<span id="noticeTip"></span>
						</div>
						
						<div class="item-submit">
							<label>&nbsp;</label> 
							<br/>
							<input type="submit" class="btn-submit" value="创建小组!" />
						</div>
					</form>
				</div>
				<div class="aside">

					<p class="pl">
						&gt;&nbsp;创建属于你的小组，与你的朋友一起分享亮光吧
					</p>
				</div>
				<div class="extra">
				</div>
			</div>
		</div>


		<%@include file="/footer.jsp"%>

	</div>

</body>
</html>

